<?php

class Application_Model_Debt extends Application_Model_ModelAbstract
{
    protected $debt_id;
    protected $name_debter;
    protected $debt_summ;
    protected $type_debt;
    protected $date_debt;
    protected $date_return;

    const TYPE_MY_HAVE_TO = 1; //мне должны отдать
    const TYPE_I_HAVE_TO  = 2; //мои долги

    public function getDebtId()
    {
        return $this->debt_id;
    }

    public function getNameDebter()
    {
        return $this->name_debter;
    }

    public function getDebtSumm()
    {
        return $this->debt_summ;
    }

    public function getTypeDebt()
    {
        return $this->type_debt;
    }

    public function getDateDebt()
    {
       if ($this->date_debt) {
           return $this->date_debt;
       } else {
           return date("Y-m-d");
       }
    }

    public function getDateReturn()
    {
        if ($this->date_return) {
            return $this->date_debt;
        } else {
            return date("Y-m-d");
        }
    }

    public function setDebtId($value)
    {
        $this->debt_id = $value;
    }

    public function setNameDebter($value)
    {
        $this->name_debter = $value;
    }

    public function setDebtSumm($value)
    {
        $this->debt_summ = $value;
    }

    public function setTypeDebt($value)
    {
        $this->type_debt = $value;
    }

    public function setDateDebt($value)
    {
        $this->date_debt = $value;
    }

    public function setDateReturn($value)
    {
        $this->date_return = $value;
    }

}
